package org.jeecg.modules.temperature.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.temperature.entity.Temperature;

import java.util.List;
import java.util.Map;

/**
 * @Description: 温度
 * @Author: jeecg-boot
 * @Date:   2023-10-26
 * @Version: V1.0
 */
public interface TemperatureMapper extends BaseMapper<Temperature> {

    @Select("SELECT ROUND(avg(temperature_a), 2) AS a, ROUND(avg(temperature_b), 2) AS b, ROUND(avg(temperature_c), 2) AS c, device \n" +
            "FROM temperature \n" +
            "GROUP BY device;")
    List<Map<String, Object>> getScreenRightMiddle();
}
